<style type="text/css">
#content .company_search td {
    width: 30%;
    text-align: left;
}

#content .company_search td:nth-child(1) {
    width: auto;
}
</style>

<div id="content">
    <h2>Group Search</h2>
    <div class="searchForm">
        <?=form_open('/student/company_search');?>
        <?=form_input('searchTerm');?>
        <?=form_submit('', 'Search');?>
        <?=form_close();?>
    </div>
    <?php if ($companies): ?>
        <table class="company_search">
            <tr><th>Company Name</th><th>Location</th><th>Industry</th></tr>
                <?php foreach ($companies as $index => $company): ?>
                <?php if ($index == 5) break; ?><tr>
                    <td><a href="/student/company_details/<?=$company['company_id']; ?>"><?=ucwords($company['company_name']);?></a></td>
                    <td><?=ucwords($company['city'] . ', ' . $company['state']);?></td>                    
                    <td><?=$company['industry'];?></td>
                </tr><?php endforeach; ?>
        </table>
    <?php endif; ?>
</div> <!-- #content -->